package study.bean;

public class Animal {

    public String name="动物";

     public int  age=10;

     public  Animal(){
         System.out.println("Animal被创建了");
     }

    /**
     * 有参构造
     * @param name
     * @param age
     */
    public Animal(String name, int age) {
        System.out.println("父类的有参构造");
        this.name = name;
        this.age = age;
    }

    public void eat(){
         System.out.println("父类吃东西的方法");
     }
}
